package com.heh.mybatisplus.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.heh.mybatisplus.model.BidInfo;
import com.heh.mybatisplus.service.BidInfoService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;

@RestController
public class BidInfoController {
    @Resource
    private BidInfoService service; // 使用接口

    //http://localhost:8097/users?page=1&size=10
    @GetMapping("/users")
    public IPage<BidInfo> getUsersByPage(@RequestParam int page, @RequestParam int size) {
        return service.getUsersByPage(page, size);
    }
}
